//
// Created by Administrator on 2020/7/20 0020.
//

#include "ShuaiShuai.h"

const string &ShuaiShuai::getPlayPhoneTime() const
{
    return playPhoneTime;
}

void ShuaiShuai::setPlayPhoneTime(const string &playPhoneTime)
{
    ShuaiShuai::playPhoneTime = playPhoneTime;
}

const string &ShuaiShuai::getDoHomeworkTime() const
{
    return doHomeworkTime;
}

void ShuaiShuai::setDoHomeworkTime(const string &doHomeworkTime)
{
    ShuaiShuai::doHomeworkTime = doHomeworkTime;
}

double ShuaiShuai::getHappinessValue() const
{
    return happinessValue;
}

void ShuaiShuai::setHappinessValue(double happinessValue)
{
    ShuaiShuai::happinessValue = happinessValue;
}

double ShuaiShuai::getAngerValue() const
{
    return angerValue;
}

void ShuaiShuai::setAngerValue(double angerValue)
{
    ShuaiShuai::angerValue = angerValue;
}

void ShuaiShuai::playPhone(string playTime)
{
    happinessValue+=10*atoi(playTime.c_str());
}

void ShuaiShuai::doHomework(string doHomeworkTime)
{
    happinessValue-=10*atoi(doHomeworkTime.c_str());
}

void ShuaiShuai::beHit()
{
    happinessValue-=10;
}

void ShuaiShuai::beScold()
{
    happinessValue-=5;
}
